﻿using System.Collections.Generic;
using com.guojin.core.io;
using com.guojin.core.io.message;

namespace com.guojin.mj.net.message.game
{
    public class ChapterEndRet : Message
    {
        public static int TYPE = 12;
        public static int ID = 17;

        public bool isJvGuo { get; set; }                                 //本轮是否聚锅
        public int[] winnerLocationdIndex { get; set; }           //比点只有一个胜利玩家，使用int[]方便其他游戏修改
        public List<UserChapterInfoRet> userMsg { get; set; }

        public void decode(Input _in)
        {
            isJvGuo = _in.readBoolean();
            winnerLocationdIndex = _in.readIntArray();
            userMsg = new List<UserChapterInfoRet>();
            userMsg = _in.readList<UserChapterInfoRet>(_in);
        }

        public void encode(Output _out)
        {
        }

        public int getMessageId()
        {
            return ID;
        }

        public int getMessageType()
        {
            return TYPE;
        }

        public string toString()
        {
            return "ChapterEndRet[isJvGuo=" + isJvGuo + " winnerlocationIndex=" + winnerLocationdIndex + "userMsg=" + userMsg + " ]";
        }
    }
}